<?php 
    require_once('inc/conn.php');

 ?>
 <!doctype html>
 <html lang="en">
 <head>
     <meta charset="UTF-8">
     <title>Document</title>
 </head>
 <body>
     <?php 
            if($_POST['pass']==''){
                echo "<script>alert('密码不能为空');window.location.href='guanliyuan_list.php'</script>";
                exit;
            }

            $sql="UPDATE admin SET pass='".$_POST['pass']."' WHERE id='".$_GET['id']."'";
            mysql_query($sql);
            echo "<script>alert('密码修改成功!');window.location.href='guanliyuan_list.php'</script>";
            mysql_close($conn);

      ?>
 </body>
 </html>